{include file="header.html"}
{if $user_id}
<div class="title tc ml-30 mr-10" style="padding-top: 0px;">
	<h2>我的选材信息</h2>
</div>
<div class="content px-20">
<form name="myForm" id="myForm" action="/index.php?act=guide&st=saveUserGuidance" method="post">
	<section id="section1">
		<table class="my-10">
		    <tbody> 
		         <tr>
		            <td class="pl-10 tc"> 拟选购产品</td><td class="pl-15"><input id="Product_Type" name="Product_Type" type="text"/><br/><font color='red' id='td_Product_Type'></font></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tc"> 规格</td><td class="pl-15"><input id="Product_Spec" name="Product_Spec" type="text" /><br/><font color='red' id='td_Product_Spec'></font></td>
		        </tr>
		        <tr>
		            <td class="pl-10 tc"> 牌号</td><td class="pl-15"><input id="Product_Grade" name="Product_Grade" type="text" /><br/><font color='red' id='td_Product_Grade'></font></td>
		        </tr>
		        <tr>
		            <td class="pl-20 tl" colspan="2">购入产品用途：<br/>
		            	<textarea name="Product_Purpose" style="width:95%;height:50px" id="Product_Purpose"></textarea>
		            	<br/><font color='red' id='td_Product_Purpose'></font>
		            </td>
		        </tr>	       
		        <tr>
		            <td class="pl-20 tl" colspan="2">前期使用中易出现问题：<br/>
		            	<textarea name="Use_Note" style="width:95%;height:50px" id="Use_Note"></textarea>
		            	<br/><font color='red' id='td_Use_Note'></font>
		            </td>
		        </tr>	       
		        <tr>
		            <td class="pl-20 tl" colspan="2">使用工艺特点及参数：<br/>
		            	<textarea name="Use_Technology" style="width:95%;height:50px" id="Use_Technology"></textarea>
		            	<br/><font color='red' id='td_Use_Technology'></font>
		            </td>
		        </tr>	       
		    </tbody>
		</table>
		<p class="tc mt-10"><span id="btn_submit" class="btn w-150" style="display:inline-block"> 提&nbsp;&nbsp;&nbsp;&nbsp;交 </span></p>
	</section>		
</form>
<script type="text/javascript">
$(function(){
	$("#btn_submit").click(function(){
		var Product_Type = $.trim($("#Product_Type").val());
		var Product_Spec = $.trim($("#Product_Spec").val());
		var Product_Grade = $.trim($("#Product_Grade").val());
		var Product_Purpose = $.trim($("#Product_Purpose").val());
		var Use_Note = $.trim($("#Use_Note").val());
		var Use_Technology = $.trim($("#Use_Technology").val());
		var errCount = 0;
		var errMsg = '';
		if(Product_Type == '') {
			errMsg = "请输入拟选购产品！";
			$("#td_Product_Type").html(errMsg).show();;
			errCount = errCount+1;
		}
		if(Product_Spec == '') {
			errMsg = "请输入规格！";
			$("#td_Product_Spec").html(errMsg).show();;
			errCount = errCount+1;
		}
		if(Product_Grade == '') {
			errMsg = "请输入牌号！";
			$("#td_Product_Grade").html(errMsg).show();;
			errCount = errCount+1;
		}
		if(Product_Purpose == '') {
			errMsg = "请输入购入用途！";
			$("#td_Product_Purpose").html(errMsg).show();;
			errCount = errCount+1;
		}
		if(Use_Note == '') {
			errMsg = "请输入前期使用中易出现问题！";
			$("#td_Use_Note").html(errMsg).show();;
			errCount = errCount+1;
		}
		if(Use_Technology == '') {
			errMsg = "请输入使用工艺特点及参数！";
			$("#td_Use_Technology").html(errMsg).show();;
			errCount = errCount+1;
		}
		if(errCount == 0) {
			$("#myForm").submit();
		} else {
			return false;
		}		
	});
	$("input,textarea").change(function(){
		var obj = $(this).attr("id");
		var objVal = $.trim($("#"+obj).val());
		if(objVal != '') {
			$("#td_"+obj).hide();
		}
	});
});
</script>
</div>
{else}
<script type="text/javascript">
document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
	alert('您好！您还未进行用户注册，不能享受此服务');
	WeixinJSBridge.call('closeWindow');
});
</script>
{/if}
{include file="footer.html"}